# -*- coding: utf-8 -*-
CMDSetsBasic={
    'info':'*IDN?',
    'reset':'*RST?',
    'screen_capture':''
}

Fixture_CmdSets={
    'tt_ver':"tt_ver",
    'tt_info':'tt_info',
    'vddmain':'tt_info'
}

TEKMSO4104B_CmdSets={
    'vertical':{
        'label':{ 'query':'CH{}:LABEL?', 'set':'CH{}:LABEL \"{}\"' },
        'bandwidth':{ 'query':'CH{}:BANDWIDTH?', 'set':'CH{}:BANdwidth {}' },
        'scale':{ 'query':'CH{}:SCAle?', 'set':'CH{}:SCAle {}' },
        'select':{ 'query':'SELect:CH{}?', 'set':'SELect:CH{} {}' }
    },
    'horizontial':{
        'select': {'query': 'CH{}:SCAle?', 'set': 'CH{}:SCAle {}'}
    },
    'trigger':{},
    'multipurpose':{},
    'waveinspector':{},
    'mode':{
        'runstop':'ACQuire:STOPAfter RUNSTop',
        'single':'ACQuire:STOPAfter SEQuence'
    }
}

SIPFixture_CmdSets={
    'wfpga':{
        'ext_reg_rd':'tt_wfpga_ext_reg_rd_long_{}_{}_{}\n', # 
        'ext_reg_wr':'tt_wfpga_ext_reg_wr_long_{}_{}_{}_{}\n'
    },
    'battpwr':{
        'ocpset':'tt_wbattpwr_ocpset_{}\n', # int
        'vset':'tt_wbattpwr_vset_{}\n',
        'off':'tt_battpwr_off\n',
        'svset':'tt_wbattpwr_svset_3.8_5\n'
    },
    'usbpwr':{
        'ocpset':'tt_wusbpwr_ocpset_{}\n',
        'vset':'tt_wusbpwr_vset_{}\n', # float
        'off':'tt_usbpwr_off\n'
    },
    'gpio':'tt_sn_{}_{}\n', # int, on/off
    'br':'tt_baudrate_{}_sel_{}\n', # mlb/pc, 115200/230400
    'get_ver':'tt_ver\n',
    'get_info':'tt_info\n',
    'cc':{
        'pullup':'tt_cc{}_pullup_{}\n', # int, on/off
        'cross':'tt_cc_cross_{}\n', # on/off
        'talk':'tt_cc_talk_{}\n',
        'talk_ptn':'tt_cc_talk_ptn_{}\n'
    },
    'e85pmux':'tt_e85p{}mux_{}\n', # int, dpdn/off/socuart
    'vddmainpwr':{
        'closedut':'tt_vddmainpwr_close_dut\n',
        'off':'tt_vddmainpwr_off\n',
        'opendut':'tt_vddmainpwr_open_dut\n',
        'vset':'tt_wvddmainpwr_vset_{}\n'
    },
    'amux':'tt_amux{}_{}\n',
    'faction':'tt_fixture_{}\n', # in/out/up/down
    'ledrst':'tt_allled_rst\n',
    'reset':'tt_rst\n',
    'sip':{
        'rdadc_t':'tt_sip_readadc_t_buck{}\n',
        'rdadc_v':'tt_sip_readadc_v_buck{}\n',
        'rdadc':'tt_sip_readadc_all\n',
        'get_gain_offset':'tt_sip_get_gain_offset\n'
    }
}

Keysight_34461A={ 
    # DMM = digit multimeter
    'dmm':{
        'volt':{
            'query':'MEAS:VOLT?'
        },
        'curr':{
            'query':'MEAS:CURR? {}'
        }
    }
}

Keysight_N6705C={
    # DC Power Analyzer
    'outp':'OUTP {},(@{})',
    'reset':'*RST',
    'curr':{
        'set':'CURR {},(@{})',
        'query':'MEAS:CURR? (@{})',
        'range':{
            'set':'CURR:RANGE {},(@{})',
        }
    },
    'emul':{
        'ccload':'EMUL CCLoad,(@{})',
        'ps2q':'EMUL PS2Q,(@{})'
    },
    'volt':'VOLT {},(@{})',
    'volt_limit_positive':'VOLT:LIMIT:POSITIVE {},(@{})'
}


